package com.chris.core.socket.netty.dto;

/**
 * Socket类型
 */
public enum SocketTypeEnum {

    /**
     * 字节类型
     */
    ByteSocket(0,"字节类型"),
    /**
     * 文本类型
     */
    StringSocket(1,"文本类型"),
    /**
     * 对象类型
     * 一般是: java to java
     */
    @Deprecated
    ObjectSocket(3,"对象类型"),
    WebSocket(4,"WebSocket"),
    HttpSocket(5,"HttpSocket"),
    /**
     * 自定义数据类型
     * 替代ObjectSocket类型(已经被netty废弃)
     * 一般是: java to java
     */
    CustomSocket(6,"CustomSocket");

    private int code;
    private String type;

    SocketTypeEnum(int code, String type) {
        code=code;
        type=type;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
